package com.starhub.engine.ai.enums;

public enum AIModelTypeEnum {
    OPENAI("openai", "OpenAI模型"),
    AZURE("azure", "Azure OpenAI模型"),
    OLLAMA("ollama", "Ollama模型");

    private final String code;
    private final String desc;

    AIModelTypeEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public String getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static AIModelTypeEnum getByCode(String code) {
        for (AIModelTypeEnum type : values()) {
            if (type.getCode().equalsIgnoreCase(code)) {
                return type;
            }
        }
        return null;
    }
} 